Skip to main content
This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal

HCL Notes/Domino 8.5 Forum (includes Notes Traveler)

HCL Notes/Domino 8.5 Forum (includes Notes Traveler)

Previous Next

Great approach but I think there is an issue

I think this is a great approach since it isolates the validation to the button action.

When looking at this this weekend I believe there is an issue with the timing of setting the sessionScope variable.

By the time the button action fires off, the validation phase has already occurred. So the sessionScope variable does not get set in time for the validation phase (here's a link to the JSF lifecycle phases: http://www.ibm.com/developerworks/library/j-jsf2/basic-lifecycle.gif). Therefore it does not validate the fields.

Can you check to see if you see the same behavior the first time the button is clicked?

I tried to fire off an error in the code, but it comes back to the timing. If you set the field to be required via server side script, the XPage needs to be reloaded for that to be in affect.

By accessing the component (JSF), you can manipulate the properties directly:

tmp=getComponent("SKU1"); //get input control
//some if statement goes here
tmp.setValid(false);
tmp.setRequired(true);
return;

But... once it is loaded and is required, you have the issue with the pager again.

I was looking into adding a message via script by using facesContext.addMessage() and just performing the validation logic manually but having the messages control display the error message with any other errors. I'm having trouble with accessing the right classes for this. I am still looking into it....

John


Feedback response number WEBB7P3NNL created by ~Ethan Umresaakol on 02/08/2009

xpages validation fighting with vie... (~Gus Chukikonyo... 4.Feb.09)
. . Partial update? (~Justin Zekaman... 4.Feb.09)
. . . . Tried both Partial Update and No da... (~Gus Chukikonyo... 4.Feb.09)
. . . . . . Looks like a bug - PMR opened *EOM*... (~Gus Chukikonyo... 4.Feb.09)
. . . . . . . . Lotus says "working as designed" (~Gus Chukikonyo... 5.Feb.09)
. . . . . . . . . . A workaround... (~Wendy Ekwether... 5.Feb.09)
. . . . . . . . . . . . Excellent Suggestions Ken (~Gus Chukikonyo... 7.Feb.09)
. . . . . . . . . . . . Great approach but I think there is... (~Ethan Umresaak... 8.Feb.09)
. . . . . . . . . . . . . . using addMessage in an XPage (~Delores Nonger... 4.Dec.09)
. . . . . . . . . . . . Possible solution (~Ben Quettumige... 11.Jun.09)




Printer-friendly

Search this forum

Member Tools


RSS Feeds

 RSS feedsRSS
All forum posts RSS
All main topics RSS